-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix shorts #235
base: main
Are you sure you want to change the base?
Fix shorts #235
Conversation
Whoops. Had a brain fart when refactoring the screensaver fix. |
Thanks for working on this problem! |
@cremor can you take a picture? |
How did you take this picture? It looks more like the video is in the correct spot but the entire UI is offset |
It's just a photo I took with my phone. The short video was paused there, but that doesn't make a difference. |
You are right. The white border isn't in the center of the screen. The video itself seems to be in the center. |
Do you know how to use the web inspector tool? Can you check the computed styles of the top-most element that's offset incorrectly? |
No, but I think I could figure it out with a few hints. What software would I use to do that? I've only used WebOS Device Manager to install the app on the TV. |
You need node.js 22 LTS installed. Then download a copy of this repository and open the folder in terminal. Then run:
|
It was a bit more complicated than that 😅 I had to install the WebOS CLI tools and setup the device connection for my TV with it. Only then I could use the But even then, how do I continue? I opened the shown "Application Debugging" URL in a browser and it showed YouTube under "Inspectable WebContents". But after clicking it I only get an empty page and the browser dev tools only show an empty body tag. |
Do you have the app launched on ur TV? If you don't, it's not going to work well. |
Yes, the app was running. I even had a short opened (in paused state). |
It might be because you're using the CLI tools provided by LG. Try uninstalling it and use the CLI tools that are included by this project. Your terminal must be opened to the project directory and you need to prefix |
Same result. Seems like this is a deprecated function which is not supported in modern browsers any more: https://webostv.developer.lge.com/faq/2020-05-20-debugging-web-inspector-not-working-chrome-v80 |
You can always try a portable version. https://google-chrome-portable.en.uptodown.com/windows/download/2171677 |
That "portable installer" doesn't work. It seems like that portable Chrome version isn't available any more (the error message contains a 404). |
Ok, I found a working version at https://portapps.io/app/ungoogled-chromium-portable/#download This seems to be the top element of the border around the short video: And here are its computed styles: The computed styles of the video element might also be interesting: |
Can you take a pic of your TV just like last time again but with the edges of your TV clearly visible? |
Your Can you show me the computed styles for the |
Show me the computed styles for the |
Your computed styles match up exactly with mines so the offset theoretically shouldn't be possible. Lemme know when you get back and feel like jumping on this problem again. I appreciate your help. Happy holidays. |
I tested this on a LG C1 (using webOS 6.4.0) and now shorts are working fine, with the previous version (v0.3.5-rc1) shorts looked bad, the video was out of frame and stretched horizontally. |
src/screensaver-fix.ts
Outdated
|
||
/** | ||
* Check to see if identical before assignment as some webOS versions will trigger a mutation | ||
* mutation event even if the assignment effectively does nothing, leading to an infinite loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutation mutation double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
I also have an LG OLED C9 with WebOS 4.9.17. In addition, the thumbnails of the shorts in the menu or in the search are always black. Merry Christmas! :) |
@Gagac44 I assume you are using the normal release build? This is a pull request discussion. Please only comment here if you actually tested the changes from this PR (by building the app yourself). |
@fire332 I'm back home and just updated to the latest build from your |
Welcome back. Can you enter this into the console and check if the borders are symmetrical? document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML="* { border: green solid 1px; }";return x;})()) |
That is very weird. That command not only shows borders around all elements, but it also moves the shorts video element so that it is placed correctly. The moment I execute the command the shorts video is moved a bit to the left. I've tested this twice to confirm it. It also looks like executing the command brings the video element in the foreground, because it then overlaps the grey border at the top and bottom. |
lg g1 webos 03.41.05 works fine with this update |
Is it the video that shifts back or the UI? |
The video. |
@cremor can you run the the same command in console but replace the |
What happens if you set the border to |
Nothing happens when I do this. |
This PR is built on top of #234. That should be dealt with before this one.#234 is merged.Re-based onto main.Fixes #210, fixes #211, fixes #219
Changes
Allow using TypeScript in app code by adding TypeScript support to babel.Cherry-picked into Misc dev changes #238.